@import "../abstracts/variables.scss";
@import "../abstracts//mixins";

@mixin headingInputContainerMixin {
  position: relative;
  width: 19.5%;

  & input {
    color: $text-area-color-dark;
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    padding-left: 2.4rem;
    font-size: 1.4rem;
    outline: none;
    border: 1px solid rgba(34, 34, 34, 0.192);
    transition: all 0.3s ease-in;
    width: 100%;

    @include sm {
      font-size: 1.2rem;
    }
  }

  & svg {
    position: absolute;
    top: 1.1rem;
    left: 0.5rem;
    height: 1.5rem;
    width: 1.5rem;

    @include sm {
      top: 1.1rem;
      height: 1.2rem;
      width: 1.2rem;
    }
  }

  @include sm {
    width: 23%;
  }
}

@mixin rowContainerMixin {
  width: 19.5%;
  font-size: 1.3rem;
  overflow-x: scroll;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  font-family: $font-family-2;
  padding-left: 0.3rem;

  &::-webkit-scrollbar {
    display: none;
  }

  @include sm {
    font-size: 1.2rem;
    width: 23%;
  }
}

.transactionsTableContainer {
  width: 100%;

  &__tableWrapper {
    width: 100%;

    &__headerContainer {
      @include flexbox;
      @include justify-content(space-between);
      @include flex-direction(row);
      margin: 1.5rem 0;
      padding: 1rem;
      background-color: rgb(243, 243, 243);
      width: 100%;

      &__url {
        @include headingInputContainerMixin;
      }

      &__method {
        @include headingInputContainerMixin;
      }

      &__status {
        @include headingInputContainerMixin;
      }

      & span {
        width: 19.5%;
        padding: 0.8rem 1rem;
        font-size: 1.4rem;
        text-align: center;

        @include sm {
          font-size: 1.2rem;
          width: 14%;
        }
      }
    }

    &__bodyContainer {
      height: 25rem;
      overflow: scroll;

      &__rowContainer {
        @include flexbox;
        @include justify-content(space-between);
        @include flex-direction(row);
        margin: 1rem 0;
        padding: 1rem;

        &__url {
          @include rowContainerMixin;
        }

        &__method {
          @include rowContainerMixin;
        }

        &__status {
          @include rowContainerMixin;
        }

        &__duration {
          @include rowContainerMixin;

          @include sm {
            width: 14%;
          }
        }

        &__time {
          @include rowContainerMixin;

          @include sm {
            width: 14%;
          }
        }
      }
    }
  }
}
